home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
extras
/
programm
/
gemfsc19
/
gemfsc19.lzh
/
GEMFUNCS
/
OBJBMBTN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-07
|
931b
|
34 lines
/**************************************************************************
* OBJBMBTN.C - The obj_bmbuttons() function.
*************************************************************************/
#include "gemfintl.h"
short obj_bmbuttons(ptree, parent, selstate, newbits)
register OBJECT *ptree;
register short parent;
register short selstate;
register short newbits;
{
register OBJECT *pobj;
register short state;
register short xtype;
register short oldbits = 0;
register short curobj = ptree[parent].ob_head;
while(curobj != parent && curobj != -1) {
pobj = &ptree[curobj];
xtype = OBXTYPE(pobj);
state = pobj->ob_state;
if (state & selstate) {
oldbits |= xtype;
}
if (newbits != OBJ_BMINQUIRE) {
pobj->ob_state = (newbits & xtype) ?
(state | selstate) : (state & ~selstate);
}
curobj = ptree[curobj].ob_next;
}
return oldbits;
}